import java.util.ArrayList;
import java.util.List;

public class Group {
    private String groupName;
    private List<Student> students;
    private List<Teacher> teachers;

    public Group() {
        this.groupName = groupName;
        this.students = new ArrayList<>();
        this.teachers = new ArrayList<>();
    }

    public void addStudent(Student student) {
        students.add(student);
    }

    public void addTeacher(Teacher teacher) {
        teachers.add(teacher);
    }

    public void displayMembers() {
        System.out.println("Group: " + groupName);
        System.out.println("Students:");
        for (Student student : students) {
            System.out.println(student.getid());
        }
        System.out.println("Teachers:");
        for (Teacher teacher : teachers) {
            System.out.println(teacher.getid());
        }
    }
}
